#ifndef SHADER_H
#define SHADER_H
#include "Troll3D_global.h"
#include <string>
#include <GL/glew.h>
#include <stdio.h>
#include <iostream>
#include <string>
#include <vector>
#include <fstream>

/*! @brief Load and Compile A vertex or Fragment shader     */
class TROLL3DSHARED_EXPORT Shader
{
    /****************************************
    /*          Public
    /****************************************/
    public :

        /****************************************
        /*          Constructor
        /****************************************/

            /*!     @brief The constructor will create a new Shader, setting it's type to the "ShaderType" value
             *      and Loading the code inside the given file
             *
             *          @param the "Type" can take GL_VERTEX_SHADER or GL_FRAGMENT_SHADER
             */

            Shader(GLenum type, const char * path);

            ~Shader();

        /****************************************
        /*          Methods
        /****************************************/

            int Init(); //Return 0 if the initialization failed

            int Compile();  //Return 0 if compilation failed

        /****************************************
        /*          Properties
        /****************************************/

            GLenum          m_Type;         /*!<    Is the Shader a Fragment, Vertex or Geometry    */

            std::string     m_FilePath;     /*!<    Path to the file containing Shader code        */
            GLuint          m_Id;           /*!<    Id give by the glCreateShader function          */


};

#endif
